﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace StudentManagement.Models
{
    public static class ModelBuilderExtions
    {
        public static void Seed(this ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Student>().HasData(
                
                new Student() 
                {
                    Id=1,
                    Name="张三",
                    ClassName=ClassNameEnum.FirstGrade,
                    Email="111@qq.com",
                },
                 new Student()
                 {
                     Id = 2,
                     Name = "李四",
                     ClassName = ClassNameEnum.SecondGrade,
                     Email = "222@qq.com",
                 }
            );
        }
    }
}
